package com.flyco.modules.sms.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.flyco.modules.sms.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.flyco.modules.sms.model.SmsCouponModel;
import com.flyco.modules.sms.vo.SmsCouponVO;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 优惠券管理
 * @Author: flyco
 * @Date:   2020-01-07
 * @Version: V1.0
 */
public interface ISmsCouponService extends IService<SmsCoupon> {


	public void addRelation(SmsCouponModel smsCouponModel);

	public void editRelation(SmsCouponModel smsCouponModel);

	public void formatCouponModel(SmsCouponModel smsCouponModel);

	public String checkCouponModel(SmsCouponModel smsCouponModel);

	public List<SmsCouponProductRelation> queryProductyRelationById (Long id);

	public List<SmsCouponProductCategoryRelation> queryCategoryRelationById (Long id);
	/**
	 * 添加一对多
	 * 
	 */
	public void saveMain(SmsCoupon smsCoupon, List<SmsCouponHistory> smsCouponHistoryList) ;
	
	/**
	 * 修改一对多
	 * 
	 */
	public void updateMain(SmsCoupon smsCoupon, List<SmsCouponHistory> smsCouponHistoryList);
	
	/**
	 * 删除一对多
	 */
	public void delMain(Long id);
	
	/**
	 * 批量删除一对多
	 */
	public void delBatchMain(Collection<? extends Serializable> idList);


	public Page<SmsCouponVO> getCouponGrantPage(Page<SmsCouponVO> page, Wrapper<SmsCouponVO> wrapper);
}
